package com.ecloud.openapi.security.convert;

import java.util.List;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import com.ecloud.openapi.security.dto.BaseUserRoleDto;
import com.ecloud.openapi.security.po.BaseUserRolePo;
import com.ecloud.openapi.security.vo.BaseUserRoleVo;

/**
 * BaseUserRoleConvert 模型转换
 *
 * @author LiuGangQiang Create in 2021/07/04
 */
@Mapper
public interface BaseUserRoleConvert {
    BaseUserRoleConvert INSTANCE = Mappers.getMapper(BaseUserRoleConvert.class);

    /**
     * {@link BaseUserRoleDto}对象 >> {@link BaseUserRolePo}对象
     *
     * @author LiuGangQiang Create in 2021/07/04
     * @param dto 入参
     * @return {@link BaseUserRolePo} 对象
     */
    BaseUserRolePo dtoToPo(BaseUserRoleDto dto);

    /**
     * {@link BaseUserRoleDto}集合 >> {@link BaseUserRolePo}集合
     *
     * @author LiuGangQiang Create in 2021/07/04
     * @param dtos 入参
     * @return {@link BaseUserRolePo} 集合
     */
    List<BaseUserRolePo> dtoToPo(List<BaseUserRoleDto> dtos);

    /**
     * {@link BaseUserRolePo}对象 >> {@link BaseUserRoleVo}对象
     *
     * @author LiuGangQiang Create in 2021/07/04
     * @param dto 入参
     * @return {@link BaseUserRoleVo} 对象
     */
    BaseUserRoleVo poToVo(BaseUserRolePo po);

    /**
     * {@link BaseUserRolePo}集合 >> {@link BaseUserRoleVo}集合
     *
     * @author LiuGangQiang Create in 2021/07/04
     * @param dtos 入参
     * @return {@link BaseUserRoleVo} 集合
     */
    List<BaseUserRoleVo> poToVo(List<BaseUserRolePo> pos);
}
